{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "typing_speed_calculetor.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "toc_visible": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "metadata": {
        "id": "1JcI7R1rCD3M",
        "colab_type": "code",
        "outputId": "00b8e8ea-47f2-445d-e912-6533ca5e012a",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 124
        }
      },
      "source": [
        "pip install pygame      \n"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Collecting pygame\n",
            "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/8e/24/ede6428359f913ed9cd1643dd5533aefeb5a2699cc95bea089de50ead586/pygame-1.9.6-cp36-cp36m-manylinux1_x86_64.whl (11.4MB)\n",
            "\u001b[K     |████████████████████████████████| 11.4MB 2.7MB/s \n",
            "\u001b[?25hInstalling collected packages: pygame\n",
            "Successfully installed pygame-1.9.6\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "MgSMD9-aCtUp",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "import pygame\n",
        "from pygame.locals import *\n",
        "import sys\n",
        "import time\n",
        "import random\n"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "3TUgu1LCDJyw",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "class Game:\n",
        "  def __init__(self):\n",
        "    self.w=750\n",
        "    self.h=500\n",
        "    self.reset=True\n",
        "    self.active=False\n",
        "    self.input_text=''\n",
        "    self.word= ''\n",
        "    self.time_start = 0\n",
        "    self.total_time=0\n",
        "    self.accuracy='0%'\n",
        "    self.results ='Time:0 Accuracy:0 %Wpm:0'\n",
        "    self.wpm= 0\n",
        "    self.end= False\n",
        "    self.HEAD_C =(255,213,102)\n",
        "    self.TEXT_C =(240,240,240)\n",
        "    self.RESULT_C =(255,70,70)\n",
        "\n",
        "    pygame.init()\n",
        "    self.open_img = pygame.image.load('type-speed-open.png')\n",
        "    "
      ],
      "execution_count": 0,
      "outputs": []
    }
  ]
}